package shili;

public class Test {
    public static void main(String[] args) {
//        NewsDao dao =SimpleDaoFactory.getInstance("mysql");
//        NewsDaoServiceImpl service = new NewsDaoServiceImpl();
//        service.setDao(dao);
        //示例5-3
        ABstractFactory factory=new MySqlDaoFactory();
        NewsDao dao = factory.getInstance();
        NewsDaoServiceImpl service = new NewsDaoServiceImpl();
        service.setDao(dao);
    }
}
